# install java
sudo yum install java

#install wget 
sudo yum install wget

# install jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
# If you have previously imported the key from Jenkins, the rmp import will fail.Ignore this and continue installing.
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkins -y

# start jenkins
sudo systemctl start jenkins
# If the server is in China,please updating the configuration file

sudo cp ./hudson.model.UpdateCenter.xml /var/lib/jenkins/hudson.model.UpdateCenter.xml
# restart jenkins arter updating configuration file
sudo systemctl restart jenkins
